home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ 12⁄8⁄89 / 0179-External Object Code-Dec89 < prev    next >
Encoding:
Text File  |  1989-12-08  |  1.7 KB  |  54 lines  |  [TEXT/GEOL]

  1. Item    6864157                         7-Dec-89        09:07
  2.  
  3. From:   D1950                           CSG, Don Phillips,PRT
  4.  
  5. To:     MACAPP.TECH$                    MacApp Technical
  6.  
  7. cc:     MACDTS                          Macintosh Developer Tech. Supt.
  8.  
  9. Sub:    External Object Code
  10.  
  11. Hi,
  12.  
  13. I would like to use the bsearch() and qsort() routines from the C libraries in
  14. my MacApp/Pascal program.  How do I go about doing this?
  15.  
  16. In an implementation section of one of my MacApp modules
  17. (UTTSearchMatches.inc1.p)  I have the following statement:
  18.  
  19. PROCEDURE qsort( base : PTR; nmemb : LONGINT; size : LONGINT;
  20.    FUNCTION compar( prmItem1 : PTR; prmItem2 : PTR ) : LONGINT ); C; EXTERNAL;
  21.  
  22. just like the Pascal manual tells me to.
  23.  
  24. This is a dump of my screen when I try to compile:
  25.  
  26. MABuild Ch
  27. MABuild - v. 2.0ß9 Release 7/5/89          Start: 11:56:31 12/7/89
  28.  
  29. Copyright Apple Computer, Inc. 1986-1989
  30. All Rights Reserved.
  31.  
  32. Target Folder: "HardDisk:Choices:.Debug Files:"
  33. Making:        Ch.MAMake
  34. Compiling:     UCh.p
  35. Compiling:     MCh.p
  36. Compiling:     UTTSearchMatches.p
  37. Linking:       Ch
  38. ### Link: Error: Undefined entry, name: (Error 28) "compar"
  39. Referenced from: TTSEARCHMATCHES_SORTOCCUPATIONCOUNTS in file:
  40. HardDisk:Choices:.Debug Files:UTTSearchMatches.p.o
  41. ### Link: Errors prevented normal completion.
  42. ### MPW Shell - Execution of HardDisk:Choices:.Debug Files:Ch.MakeIt
  43. terminated.
  44.  
  45.  
  46. 1.  How can I get the linker to recognize that all I am looking for is a
  47. pointer to a function and not the real function "compar"?
  48. 2.  How do I link in the code for the C qSort function using ch.MaMake, do I
  49. have to do a separate link or can I use the 'OtherLinkFiles' shell variable?
  50.  
  51. Thanks in advance,
  52. Ken Mahoney
  53.  
  54.